onDownloadFileCompleted

open fun onDownloadFileCompleted(file: File)

Callback invoked when the DownloadFileTask2 (for downloading a rendered text image) completes. This is only relevant if useNativeRendering is false.

If the download was successful (file.isDownloaded is true) and the view is still in image rendering mode:

  • Any existing bitmap in the ImageView is recycled.
  • The new image is decoded (sampled if module dimensions are available) and set as the content of the ImageView.
If the download failed or the view has switched to native rendering, a warning is logged, and no image is set or changed.

Parameters

file

The com.reveldigital.player.json.File object representing the downloaded image. The isDownloaded field indicates success, and getMediaFile provides access to the downloaded content.